<!-- @@master  = ../../../tpl/base.html-->
<!-- @@block  =  head-->
<link rel="stylesheet" type="text/css" href="../js/bootstrap-datetimepicker/css/datetimepicker-custom.css" />
<!--tags input-->
<link rel="stylesheet" type="text/css" href="../js/jquery-tags-input/jquery.tagsinput.css" />
<style media="screen">
  #keyword .btn{
    margin: 5px;
  }
</style>
<!-- @@close-->
<!-- @@block  =  content-->
<section class="panel panel-default">
<header class="panel-heading">
  增加广告
<span class="tools pull-right">
    <a class="fa fa-chevron-down" href="javascript:;"></a>
    <a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
  <div class="form col-sm-12  col-lg-10">
      <form class="cmxform form-horizontal adminex-form" id="addAdForm" method="get" action="">
          <div class="form-group ">
              <label class="control-label col-sm-2">应用名称</label>
              <div class="col-sm-6">
                <select class="form-control" id="app_id" name="app_id" data-placeholder="请选择应用">
                    <option value=""></option>
                </select>
                <input type="hidden" name="app_store_id"/>
                <input type="hidden" name="app_store_name"/>
                <input type="hidden" name="app_name"/>
              </div>
          </div>
          <div class="form-group ">
              <label class="control-label col-sm-2">icon</label>
              <div class="col-sm-6">
                  <img style="width:60px;height:60px;" class="app_image"/>
              </div>
          </div>
          <div class="form-group bootstrap-tagsinput">
              <label class="control-label col-sm-2">关键字</label>
              <div class="col-sm-6">
                  <div class="col-sm-10" id="keyword">

                  </div>
                  <div class="col-sm-2">
                      <button class="btn btn-primary keyword-add" type="button" data-toggle="modal" data-target="#myModal">增加</button>
                  </div>
              </div>
          </div>
          <div class="form-group ">
              <label  class="control-label col-sm-2">试玩要求</label>
              <div class="col-sm-6">
                <div class="radio col-sm-12">
                    <label><input tabindex="3" type="radio" value="首次下载试玩3分钟" name="remark" checked="">首次下载试玩3分钟 </label>
                </div>
                <div class="radio col-sm-4">
                    <label><input tabindex="3" type="radio" value="" id="remark2" name="remark">自定义</label>
                </div>
                <div class="col-sm-8">
                    <input class=" form-control" type="text" id="otherRemark" maxlength="20" placeholder="自定义试玩要求最大支持20个字"/>
                </div>
              </div>
          </div>
          <div class="form-group ">
              <label class="control-label col-sm-2">投放设备</label>
              <div class="col-sm-6">
                  <select class="select-chosen form-control" name="target_model">
                      <option value="iphone" checked>iPhone</option>
                      <option value="ipad">iPad</option>
                      <option value="iphone,ipad">iPhone、iPad</option>
                  </select>
              </div>
          </div>
          <div class="form-group ">
              <label  class="control-label col-sm-2">系统要求</label>
              <div class="col-sm-6">
                <select class="select-chosen form-control" name="target_os_version">
                    <option value="6.1.0" checked>IOS 6以上</option>
                    <option value="7.0.0" checked>IOS 7以上</option>
                    <option value="8.0.0" checked>IOS 8以上</option>
                    <option value="9.0.0" checked>IOS 9以上</option>
                    <option value="10.0.0" checked>IOS 10以上</option>
                </select>
              </div>
          </div>
          <div class="form-group">
              <div class="col-sm-offset-2 col-sm-6">
                  <button class="btn btn-primary" type="submit">保存</button>
                  <button class="btn btn-default back" type="button">返回</button>
              </div>
          </div>
          <div id="keyword-box"></div>
      </form>
    </div>
</div>
</section>
<!-- @@close-->
<!-- @@block  =  foot-->
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">添加关键字投放</h4>
      </div>
      <div class="modal-body">
        <div class="form">
            <form class="cmxform form-horizontal adminex-form" id="addItem" method="get" action="">
              <div class="form-group ">
                  <label class="control-label col-sm-3">关键字</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="text" name="keyword"/>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">关键字排名</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="number" name="rank_current"/>
                  </div>
                  <div class="col-sm-2">
                      <button class="btn btn-success get-rank" type="button">获取排名</button>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">计划投放量</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="number" name="num_launch"/>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">投放开始时间</label>
                  <div class="col-sm-6">
                      <input size="16" type="text" readonly name="time_begin" id="add_begin" class="date_form form-control">
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">投放结束时间</label>
                  <div class="col-sm-6">
                      <input size="16" type="text" readonly name="time_end" id="add_end" class="date_form form-control">
                      <button type="sumbit" style="display:none"></button>
                  </div>
              </div>
            </form>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary">确认</button>
      </div>
    </div>
  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">编辑关键字投放</h4>
      </div>
      <div class="modal-body">
        <div class="form">
            <form class="cmxform form-horizontal adminex-form" id="updateItem" method="get" action="">
              <div class="form-group ">
                  <label class="control-label col-sm-3">关键字</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="text" name="keyword" readonly/>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">关键字排名</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="number" name="rank_current"/>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">计划投放量</label>
                  <div class="col-sm-6">
                      <input class=" form-control" type="number" name="num_launch"/>
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">投放开始时间</label>
                  <div class="col-sm-6">
                      <input size="16" type="text" readonly name="time_begin" id="update_begin" class="date_form form-control">
                  </div>
              </div>
              <div class="form-group ">
                  <label class="control-label col-sm-3">投放结束时间</label>
                  <div class="col-sm-6">
                      <input size="16" type="text" readonly name="time_end" id="update_end" class="date_form form-control">
                  </div>
              </div>
            </form>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-danger">删除</button>
        <button type="button" class="btn btn-primary">确认</button>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript" src="../js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="../js/ad-addAd.js"></script>
<!-- @@close-->
